package com.kma.summer2012.client.Autorisation;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.kma.summer2012.client.CrumbsUserServiceAsync;
import com.kma.summer2012.shared.model.UICrumbsUser;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Администратор
 * Date: 16.01.13
 * Time: 19:06
 * To change this template use File | Settings | File Templates.
 */
@RemoteServiceRelativePath("CrumbsAuthorisationService")
public interface CrumbsAuthorisationService extends RemoteService{
    UICrumbsUser getByLoginPassword(String login, String password);

    /**
     * Utility/Convenience class.
     * Use UserService.App.getInstance() to access static instance of UserServiceAsync
     */
    public static class App {
        private static final CrumbsAuthorisationServiceAsync ourInstance = (CrumbsAuthorisationServiceAsync) GWT.create(CrumbsAuthorisationService.class);

        public static CrumbsAuthorisationServiceAsync getInstance() {
            return ourInstance;
        }
    }
}
